package org.destiny;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication
@ImportResource(locations = { "classpath:dubbo.xml" })
public class DubboApplication {
    public static void main(String[] args) {
        SpringApplication.run(DubboApplication.class, args);
        dubboWait2();
    }

    // 让服务一直运行的
    public static void dubboWait2() {
        // 等待从终端输入
        try {
            while (true) {
                System.in.read();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
